package tasks.task08;

import info.clearthought.layout.TableLayout;

import javax.imageio.ImageIO;
import javax.swing.*;
import java.awt.*;
import java.io.IOException;
import java.util.Locale;
import java.util.ResourceBundle;


public class Task08 {
    private static ResourceBundle rb = ResourceBundle.getBundle("tasks.task08.My", Locale.ENGLISH);

    public static void main(String[] args) throws IOException {
        System.out.println(rb.getString("startButton"));
        System.out.println(rb.getString("stopButton"));

        Image i = ImageIO.read(Task08.class.getResourceAsStream("photo.jpg"));
        ImageIcon ic = new ImageIcon(i);

        TableLayout tl1 = new TableLayout(new double[]{TableLayout.FILL}, new double[]{TableLayout.FILL});
        JFrame f = new JFrame();
        f.setSize(800, 600);
        f.setLocationRelativeTo(null);
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        f.setLayout(tl1);
        JLabel jl = new JLabel(ic);

        f.add(jl, "0,0");
        f.setVisible(true);
    }

}
